Sensor

ABSTRACT

A sensor is provided. A first terminal of a first current source and a first terminal of a first transistor are connected to a cathode of the photodiode. A control terminal of a second transistor is connected to an output terminal of a first operational amplifier. A first terminal of the second transistor is connected to a second terminal of the first transistor through a first current mirror circuit. A second terminal of the second transistor is connected to a second current source, a second input terminal of a second operational amplifier and a first terminal of a third transistor. A first input terminal of the second operational amplifier is connected to the first terminal of the first transistor. A control terminal of the third transistor is connected to an output terminal of the second operational amplifier.

CROSS-REFERENCE TO RELATED PATENT APPLICATION

This application claims the benefit of priority to Taiwan PatentApplication No. 110125422, filed on Jul. 12, 2021. The entire content ofthe above identified application is incorporated herein by reference.

Some references, which may include patents, patent applications andvarious publications, may be cited and discussed in the description ofthis disclosure. The citation and/or discussion of such references isprovided merely to clarify the description of the present disclosure andis not an admission that any such reference is “prior art” to thedisclosure described herein. All references cited and discussed in thisspecification are incorporated herein by reference in their entiretiesand to the same extent as if each reference was individuallyincorporated by reference.

FIELD OF THE DISCLOSURE

The present disclosure relates to a sensor, and more particularly to asensor that includes a photodiode.

BACKGROUND OF THE DISCLOSURE

A cell phone having a touch screen is becoming more and more popular.When a user makes a call, a face of the user may easily touch the touchscreen of the cell phone which inadvertently triggers the cell phone toperform an operation. Therefore, an optical proximity sensor is ofteninstalled in the cell phone. When the optical proximity sensor detectsthat light is blocked, a system of the cell phone determines that theface is too close to the touch screen and accordingly turns off thetouch screen, thereby preventing the cell phone from being triggeredunexpectedly by being touched with the face, and a power of the cellphone can be saved during the call.

Such a mechanism firstly involves the transmitter emitting a lightsignal toward a user. Then, the light signal is reflected to aphotodiode by the user and the photodiode converts the reflected lightsignal into a photocurrent. However, a parasitic capacitor exists in thephotodiode. The photocurrent first charges the parasitic capacitor ofthe photodiode for a period of time. As a result, after the light signalis no longer reflected to the photodiode and passes through thephotodiode, a voltage of a cathode of the photodiode is affected by ahigh voltage of the charged parasitic capacitor. The voltage of thecathode of the photodiode cannot be maintained at a desired voltagevalue, such that a value of the photocurrent of the photodiode that isnot irradiated by the light signal cannot be correctly sensed.

SUMMARY OF THE DISCLOSURE

In response to the above-referenced technical inadequacies, the presentdisclosure provides a sensor. The sensor includes a photodiode, a firstoperational amplifier, a first current source, a first transistor, afirst current mirror circuit, a second transistor, a second currentsource, a second operational amplifier and a third transistor. An anodeof the photodiode is grounded. A first input terminal of the firstoperational amplifier is coupled to a reference voltage. A second inputterminal of the first operational amplifier is connected to a cathode ofthe photodiode. A first terminal of the first current source isconnected to the cathode of the photodiode. A second terminal of thefirst current source is grounded. A control terminal of the firsttransistor is connected to an output terminal of the first operationalamplifier. A first terminal of the first transistor is connected to thecathode of the photodiode. An input terminal of the first current mirrorcircuit is connected to a second terminal of the first transistor. Acontrol terminal of the second transistor is connected to the outputterminal of the first operational amplifier. A first terminal of thesecond transistor is connected to an output terminal of the firstcurrent mirror circuit. A first terminal of the second current source isconnected to a second terminal of the second transistor. A secondterminal of the second current source is grounded. A first inputterminal of the second operational amplifier is connected to a nodebetween the first terminal of the first transistor and the cathode ofthe photodiode. A second input terminal of the second operationalamplifier is connected to a node between the second terminal of thesecond transistor and the first terminal of the second current source. Acontrol terminal of the third transistor is connected to an outputterminal of the second operational amplifier. A first terminal of thethird transistor is connected to the second terminal of the secondtransistor. A second terminal of the third transistor is grounded. Acurrent flowing through the first terminal of the third transistor is acurrent sensed by the sensor.

In certain embodiments, the sensor further includes a fourth transistor.A control terminal of the fourth transistor is connected to the outputterminal of the second operational amplifier. A first terminal of thefourth transistor is coupled to a common voltage. A second terminal ofthe fourth transistor is grounded.

In certain embodiments, the sensor further includes a fifth transistor.A control terminal of the fifth transistor is connected to the outputterminal of the first operational amplifier. A first terminal of thefifth transistor is connected to the first terminal of the fourthtransistor. A second terminal of the fifth transistor is coupled to thecommon voltage.

In certain embodiments, the sensor further includes a second currentmirror circuit. An input terminal of the second current mirror circuitis connected to the second terminal of the fifth transistor. A currentof an output terminal of the second current mirror circuit is a currentsensed by the sensor.

In certain embodiments, the first current mirror circuit includes asixth transistor and a seventh transistor. A first terminal of the sixthtransistor is coupled to the common voltage. A second terminal of thesixth transistor is connected to the second terminal of the firsttransistor. A first terminal of the seventh transistor is coupled to thecommon voltage. A second terminal of the seventh transistor is connectedto the first terminal of the second transistor. A control terminal ofthe seventh transistor is connected to a control terminal of the sixthtransistor.

In certain embodiments, the first current mirror circuit furtherincludes an eighth transistor. A control terminal of the eighthtransistor is connected to the second terminal of the first transistor.A first terminal of the eighth transistor is connected to the controlterminal of the sixth transistor. A second terminal of the eighthtransistor is grounded.

In certain embodiments, the first current mirror circuit furtherincludes a ninth transistor. A first terminal of the ninth transistor iscoupled to the common voltage. A second terminal of the ninth transistoris connected to the control terminal of the sixth transistor. A controlterminal of the ninth transistor is coupled to a first control voltage.

In certain embodiments, the second current mirror circuit includes atenth transistor and an eleventh transistor. A first terminal of thetenth transistor is coupled to the common voltage, and a second terminalof the tenth transistor is connected to the second terminal of the fifthtransistor. A control terminal of the eleventh transistor is connectedto a control terminal of the tenth transistor. A first terminal of theeleventh transistor is coupled to the common voltage. A second terminalof the eleventh transistor is an output terminal of the sensor.

In certain embodiments, the second current mirror circuit furtherincludes a twelfth transistor. A control terminal of the twelfthtransistor is connected to the second terminal of the fifth transistor.A first terminal of the twelfth transistor is connected to the controlterminal of the tenth transistor. A second terminal of the twelfthtransistor is grounded.

In certain embodiments, the second current mirror circuit furtherincludes a thirteenth transistor. A first terminal of the thirteenthtransistor is coupled to the common voltage. A second terminal of thethirteenth transistor is connected to the control terminal of the tenthtransistor. A control terminal of the thirteenth transistor is coupledto a second control voltage.

In certain embodiments, the sensor further includes a third currentsource. The third current source is connected to the second terminal ofthe eleventh transistor.

In certain embodiments, the sensor further includes a first capacitor. Afirst terminal of the first capacitor is connected to the outputterminal of the first operational amplifier. A second terminal of thefirst capacitor is connected to the cathode of the photodiode.

In certain embodiments, the sensor further includes a second capacitor.A first terminal of the second capacitor is connected to the outputterminal of the second operational amplifier. A second terminal of thesecond capacitor is grounded.

In addition, the present disclosure provides a sensor. The sensorincludes a photodiode, a first operational amplifier, a first currentsource, a first transistor, a second transistor, a current mirrorcircuit, and a pre-charge capacitor. An anode of the photodiode isgrounded, and the photodiode is configured to convert energy of lightpassing through the photodiode into a photocurrent. A first inputterminal of the first operational amplifier is coupled to a referencevoltage. A second input terminal of the first operational amplifier isconnected to a cathode of the photodiode. A first terminal of the firstcurrent source is connected to the cathode of the photodiode and asecond terminal of the first current source is grounded. A controlterminal of the first transistor is connected to an output terminal ofthe first operational amplifier. A first terminal of the firsttransistor is connected to the cathode of the photodiode. A controlterminal of the second transistor is connected to the output terminal ofthe first operational amplifier. A current mirror circuit includes athird transistor, a fourth transistor and a fifth transistor. A firstterminal of the third transistor, a first terminal of the fourthtransistor and a first terminal of the fifth transistor are coupled tothe common voltage. A second terminal of the third transistor isconnected to a second terminal of the first transistor and a controlterminal of the third transistor. A control terminal of the fourthtransistor is connected to the control terminal of the third transistor,a second terminal of the fourth transistor and a control terminal of thefifth transistor. A second terminal of the fifth transistor is connectedto a first terminal of the second transistor. A first terminal of thepre-charge capacitor is coupled to a common voltage. A second terminalof the pre-charge capacitor is connected to the control terminal of thethird transistor. The first current source supplies a current to thepre-charge capacitor to charge the pre-charge capacitor such that avoltage of the pre-charge capacitor increases to a target voltage value.The current is stored in the control terminal of the third transistor.Then, the light passes through the photodiode. The current is dischargedfrom the third transistor through the first current source to a ground.A current flowing through a second terminal of the second transistor isa current sensed by the sensor.

In certain embodiments, the sensor further includes a second currentsource. A first terminal of the second current source is connected tothe second terminal of the second transistor, and a second terminal ofthe second current source is grounded.

In certain embodiments, the sensor further includes a first switchcomponent. A first terminal of the first switch component is connectedto the control terminal of the third transistor. A second terminal ofthe first switch component is connected to the second terminal of thefirst transistor and the control terminal of the fourth transistor.

In certain embodiments, the sensor further includes a second switchcomponent. A first terminal of the second switch component is connectedto the second terminal of the first transistor and the second terminalof the first switch component. A second terminal of the second switchcomponent is connected to the second terminal of the fourth transistor.

In certain embodiments, the sensor further includes a first capacitor. Afirst terminal of the first capacitor is connected to the outputterminal of the first operational amplifier. A second terminal of thefirst capacitor is connected to the cathode of the photodiode.

As described above, the present disclosure provides the sensor in whichthe current source is disposed and connected to the cathode of thephotodiode such that a discharging path of the parasitic capacitor ofthe photodiode is formed. As a result, after the light stops passingthrough the photodiode, the parasitic capacitor does not have a residualvoltage and the voltage of the cathode of the photodiode is not affectedby the voltage of the parasitic capacitor. Therefore, the photodiode canoperate normally. It is worth noting that, the sensor of the presentdisclosure includes the bias circuit of the photodiode such that thecurrent sensed by the sensor only includes the photocurrent that isconverted from the light signal by the photodiode, but not the currentprovided by the current source.

These and other aspects of the present disclosure will become apparentfrom the following description of the embodiment taken in conjunctionwith the following drawings and their captions, although variations andmodifications therein may be affected without departing from the spiritand scope of the novel concepts of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The described embodiments may be better understood by reference to thefollowing description and the accompanying drawings, in which:

FIG. 1 is a circuit layout diagram of a sensor according to a firstembodiment of the present disclosure;

FIG. 2 is a waveform diagram of the sensor according to the firstembodiment of the present disclosure;

FIG. 3 is a waveform diagram of the sensor according to the firstembodiment of the present disclosure;

FIG. 4 is a waveform diagram of the sensor according to the firstembodiment of the present disclosure;

FIG. 5 is a waveform diagram of the sensor according to the firstembodiment of the present disclosure;

FIG. 6 is a circuit layout diagram of a sensor according to a secondembodiment of the present disclosure;

FIG. 7 is a schematic diagram of a flow direction of a charging currentof a pre-charge capacitor of the sensor according to the secondembodiment of the present disclosure;

FIG. 8 is a schematic diagram of a flow direction of a current of thesensor according to the second embodiment of the present disclosure;

FIG. 9 is a waveform diagram of the sensor according to the secondembodiment of the present disclosure;

FIG. 10 is a waveform diagram of the sensor according to the secondembodiment of the present disclosure;

FIG. 11 is a waveform diagram of the sensor according to the secondembodiment of the present disclosure;

FIG. 12 is a waveform diagram of the sensor according to the secondembodiment of the present disclosure; and

FIG. 13 is a curve diagram of the sensor according to the first andsecond embodiments of the present disclosure and a conventional sensor.

DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS

The present disclosure is more particularly described in the followingexamples that are intended as illustrative only since numerousmodifications and variations therein will be apparent to those skilledin the art. Like numbers in the drawings indicate like componentsthroughout the views. As used in the description herein and throughoutthe claims that follow, unless the context clearly dictates otherwise,the meaning of “a”, “an”, and “the” includes plural reference, and themeaning of “in” includes “in” and “on”. Titles or subtitles can be usedherein for the convenience of a reader, which shall have no influence onthe scope of the present disclosure.

The terms used herein generally have their ordinary meanings in the art.In the case of conflict, the present document, including any definitionsgiven herein, will prevail. The same thing can be expressed in more thanone way. Alternative language and synonyms can be used for any term(s)discussed herein, and no special significance is to be placed uponwhether a term is elaborated or discussed herein. A recital of one ormore synonyms does not exclude the use of other synonyms. The use ofexamples anywhere in this specification including examples of any termsis illustrative only, and in no way limits the scope and meaning of thepresent disclosure or of any exemplified term. Likewise, the presentdisclosure is not limited to various embodiments given herein. Numberingterms such as “first”, “second” or “third” can be used to describevarious components, signals or the like, which are for distinguishingone component/signal from another one only, and are not intended to, norshould be construed to impose any substantive limitations on thecomponents, signals or the like.

First Embodiment

Reference is made to FIG. 1 , which is a circuit layout diagram of asensor according to a first embodiment of the present disclosure.

As shown in FIG. 1 , in the embodiment, the sensor may include aphotodiode PE and a first operational amplifier OPA1. A first inputterminal of the first operational amplifier OPA1 is coupled to areference voltage Vref. A second input terminal of the first operationalamplifier OPA1 is connected to a cathode of the photodiode PE. An anodeof the photodiode PE is grounded.

After a transmitter (not shown in figures) emits a light signal towardan object such as person and then the light signal is reflected to thephotodiode PE by the object, the photodiode PE converts energy of thelight signal passing through the photodiode PE into a photocurrent.However, a parasitic capacitor Cp of the photodiode PE is also chargedat the same time such that an extra charge of the parasitic capacitor Cpaffects the photocurrent. As a result, the photodiode PE cannot operatenormally.

Therefore, in the embodiment, the sensor further includes a firstcurrent source CS1. A first terminal of the first current source CS1 isconnected to the cathode of the photodiode PE. A second terminal of thefirst current source CS1 is grounded. When the light signal stopspassing through the photodiode PE, the first current source CS1 biasesthe parasitic capacitor Cp of the photodiode PE such that the parasiticcapacitor Cp is discharged through the first current source CS1 toward aground and an extra charge of the parasitic capacitor Cp is reduced.

After the first current source CS1 is disposed, a current outputted bythe sensor not only includes a photocurrent Is1 of the photodiode PE,but also includes an additional current Id. That is, the currentoutputted by the sensor includes a current supplied by the first currentsource CS1 which is for a discharge current of the parasitic capacitorCp. However, the current outputted by the sensor should only include thephotocurrent Is1 of the photodiode PE.

Therefore, in the embodiment, the sensor further includes a firsttransistor T1, a firsts current mirror circuit MR1, a second transistorT2, a second operational amplifier OPA2, a second current source CS2 anda third transistor T3.

A control terminal of the first transistor T1 is connected to an outputterminal of the first operational amplifier OPA1. A first terminal ofthe first transistor T1 is connected to the cathode of the photodiodePE. A second terminal of the first transistor T1 is connected to aninput terminal of the first current mirror circuit MR1.

An output terminal of the first current mirror circuit MR1 is connectedto a first terminal of the second transistor T2. A control terminal ofthe second transistor T2 is connected to the output terminal of thefirst operational amplifier OPA1. A second terminal of the secondtransistor T2 is connected to a first terminal of the second currentsource CS2. A second terminal of the second current source CS2 isgrounded.

In detail, the first current mirror circuit MR1 may include a sixthtransistor T6 and a seventh transistor T7. A first terminal of the sixthtransistor T6 and a first terminal of the seventh transistor T7 may becoupled to a common voltage. A second terminal of the sixth transistorT6 is connected to the second terminal of the first transistor T1. Asecond terminal of the seventh transistor T7 is connected to the firstterminal of the second transistor T2. A control terminal of the seventhtransistor T7 is connected to a control terminal of the sixth transistorT6.

If necessary, the first current mirror circuit MR1 may further includean eighth transistor T8, a ninth transistor T9, or a combinationthereof.

A control terminal of the eighth transistor T8 may be connected to thesecond terminal of the first transistor T1. A first terminal of theeighth transistor T8 may be connected to the control terminal of thesixth transistor T6 and a second terminal of the ninth transistor T9. Asecond terminal of the eighth transistor T8 may be grounded.

A first terminal of the ninth transistor T9 may be coupled to the commonvoltage. A second terminal of the ninth transistor T9 may be connectedto the control terminal of the sixth transistor T6, the control terminalof the seventh transistor T7 and the first terminal of the eighthtransistor T8. A control terminal of the ninth transistor T9 may beconnected to a first control voltage VB1.

It is worth noting that, a first input terminal such as an invertinginput terminal of the second operational amplifier OPA2 is connected toa node (referred to a first node in the following) between the firstterminal of the first transistor T1 and the cathode of the photodiodePE. A second input terminal such as a non-inverting input terminal ofthe second operational amplifier OPA2 is connected to a node (that iscalled a second node in the following) between the second terminal ofthe second transistor T2 and the first terminal of the second currentsource CS2.

A control terminal of the third transistor T3 is connected to an outputterminal of the second operational amplifier OPA2. A first terminal ofthe third transistor T3 is connected to the second node. A secondterminal of the third transistor T3 is grounded.

It should be understood that, a voltage of the first input terminal ofthe second operational amplifier OPA2 is equal to a voltage of thesecond input terminal of the second operational amplifier OPA2.Furthermore, in the embodiment, a size and characteristics of the secondtransistor T2 are exactly the same as those of the first transistor T1.Under this condition, a voltage of the first node is equal to a voltageof the second node. As a result, a current Id of the second terminal ofthe second transistor T2 (that is a current of the second current sourceCS2) is exactly equal to the current Id of the first current source CS1such that a current Is1 flowing to the first terminal of the thirdtransistor T3 is equal to the photocurrent sensed by the photodiode PEof the senor of the embodiment.

A ratio of an input current of the first current mirror circuit MR1 toan output current of the first current mirror circuit MR1 may be 1:N,where N is any appropriate integer. In the embodiment, the ratio of theinput current of the first current mirror circuit MR1 to the outputcurrent of the first current mirror circuit MR1 is 1:1, but the presentdisclosure is not limited thereto. If the ratio is 1:1, the current Is1flowing to the first terminal of the third transistor T3 is equal to thephotocurrent of the photodiode PE. If the ratio is N, the secondtransistor T2 and the second current source CS2 need to be N times ofthe first transistor T1 and the first current source CS1 respectively.The current Is1 flowing to the first terminal of the third transistor T3will be N times of the photocurrent of the photodiode PE.

If necessary, the sensor of the embodiment may further include a firstcapacitor C1, a second capacitor C2, or a combination thereof. A firstterminal of the first capacitor C1 may be connected to the outputterminal of the first operational amplifier OPA1. A second terminal ofthe first capacitor C1 may be connected to the cathode of the photodiodePE. A first terminal of the second capacitor C2 may be connected to theoutput terminal of the second operational amplifier OPA2. A secondterminal of the second capacitor C2 may be grounded.

In addition, in the embodiment, the sensor may further include a fourthtransistor T4. A control terminal of the fourth transistor T4 isconnected to the output terminal of the second operational amplifierOPA2. A first terminal of the fourth transistor T4 may be connected tothe common voltage. A second terminal of the fourth transistor T4 isgrounded.

In the embodiment, the sensor may further include a fifth transistor T5.A control terminal of the fifth transistor T5 is connected to the outputterminal of the first operational amplifier OPA1. A first terminal ofthe fifth transistor T5 is connected to the first terminal of the fourthtransistor T4. A second terminal of the fifth transistor T5 is coupledto the common voltage.

If necessary, the sensor of the embodiment may further include a secondcurrent mirror circuit MR2 and a third current source CS3. An inputterminal of the second current mirror circuit MR2 is connected to thesecond terminal of the fifth transistor T5. The current Is1 outputted bythe third current source CS3 (that is an output current of an outputterminal of the second current mirror circuit MR2) is a currentoutputted by the output terminal of the sensor of the embodiment of thepresent disclosure.

In detail, the second current mirror circuit MR2 may include a tenthtransistor T10 and an eleventh transistor T11. A first terminal of thetenth transistor T10 and a first terminal of the eleventh transistor T11may be coupled to the common voltage. A second terminal of the tenthtransistor T10 is connected to the second terminal of the fifthtransistor T5. A control terminal of the eleventh transistor T11 isconnected to a control terminal of the tenth transistor T10. A secondterminal of the eleventh transistor T11 is an output terminal of thesensor of the embodiment of the present disclosure.

If necessary, the second current mirror circuit MR2 may further includea twelfth transistor T12, a thirteenth transistor T13, or a combinationthereof. A control terminal of the twelfth transistor T12 may beconnected to the second terminal of the fifth transistor T5. A firstterminal of the twelfth transistor T12 may be connected to the controlterminal of the tenth transistor T10 and the control terminal of theeleventh transistor T11. A second terminal of the twelfth transistor T12is grounded.

A first terminal of the thirteenth transistor T13 may be coupled to thecommon voltage. A second terminal of the thirteenth transistor T13 maybe connected to the control terminal of the tenth transistor T10 and thecontrol terminal of the tenth transistor T11. A control terminal of thethirteenth transistor T13 may be coupled to a second control voltageVB2. The second terminal of the eleventh transistor T11 may be connectedto the third current source CS3.

A ratio of an input current of the second current mirror circuit MR2 toan output current of the second current mirror circuit MR2 may be 1:N,where N is any appropriate integer. Under this condition, the secondcurrent mirror circuit MR2 amplifies the input current of the secondcurrent mirror circuit MR2 to output the output current that is N timesthe input current of the second current mirror circuit MR2. In theembodiment, the ratio of the input current of the second current mirrorcircuit MR2 to the output current of the second current mirror circuitMR2 is 1:1, but the present disclosure is not limited thereto. If theratio is 1:1, the current Is1 outputted by the sensor of the embodimentis equal to the current Is1 flowing to the first terminal of the thirdtransistor T3.

Reference is made to FIGS. 1 to 5 , in which FIGS. 2 and 5 are waveformdiagrams of the sensor according to the first embodiment of the presentdisclosure.

The above-mentioned transmitter starts to emit the light signal towardthe object at a time point of a rising edge of a light emission timesignal TES1 shown in FIGS. 2 to 5 . The transmitter emits the lightsignal toward the object for a period of time during which the lightemission time signal TES1 is at a high level. The photodiode PE shown inFIG. 1 converts the light signal reflected by the object into thephotocurrent and finally the output terminal of the sensor outputs thecurrent Is1 shown in FIGS. 1 to 5 .

A processor circuit (such as an analog-digital converter) connected tothe output terminal of the sensor starts to process a signal of thecurrent Is1 outputted by the sensor shown in FIG. 1 at a time point atwhich an analog-digital processing signal ADS1 shown in FIGS. 2 to 5transits from a low level to a high level. For example, the signal ofthe current Is1 is converted from an analog form into a digital form. Atime interval during which an operational signal SNS1 shown in FIGS. 2to 5 is at a high level represents a time interval from a starting timeat which the transmitter starts to emit the light signal to an end timeat which the process of the signal of the current Is1 is completed.

For example, the output terminal of the sensor shown in FIG. 1 (that isthe second terminal of the eleventh transistor T11) may be connected toa charge capacitor (not shown in figures). The charge capacitor ischarged by the current Is1 such that a signal of a voltage of the chargecapacitor gradually rises, which is represented by a capacitor voltagesignal CVS1 as shown in FIGS. 3 and 5 . When the voltage of the chargecapacitor reaches a voltage of a reference voltage signal VRS1 as shownin FIGS. 3 and 5 , a voltage signal of the charge capacitor is pulleddown to a valley value by the processor circuit. After a period of timehas elapsed, the voltage of the charge capacitor is charged to reach thevoltage of the reference voltage signal VRS1 from the valley valueagain.

A counter of the processor circuit may count the number of times thatthe charge capacitor is charged and discharged. That is, the countercounts the number of waveforms of the capacitor voltage signal CVS1. Adistance between the object and an electronic device (such as a cellphone) to which the sensor as shown in FIG. 1 is applied is determinedaccording to the counted number.

Second Embodiment

Reference is made to FIGS. 6 to 8 , in which FIG. 6 is a circuit layoutdiagram of a sensor according to a second embodiment of the presentdisclosure.

In the embodiment, the sensor may include a photodiode PE, a firstoperational amplifier OPA1, a first current source CS1, a firsttransistor T1, a second transistor T2, a second current source CS2, afirst current mirror circuit MR11 as shown in FIG. 6 . The samedescriptions of the second and first embodiments are not repeatedherein.

It is worth noting that, in the embodiment, the sensor further includesa pre-charger capacitor Cr connected to the first current mirror circuitMR11.

In detail, the first current mirror circuit MR11 may include a thirdtransistor TR3, a fourth transistor TR4 and a fifth transistor TR5. Afirst terminal of the third transistor TR3, a first terminal of thefourth transistor TR4 and a first terminal of the fifth transistor TR5may be coupled to the common voltage.

A second terminal of the third transistor TR3 is connected to the secondterminal of the first transistor T1 and a control terminal of the thirdtransistor TR3. The control terminal of the third transistor TR3 isconnected to a second terminal of the pre-charge capacitor Cr. A firstterminal of the pre-charge capacitor Cr may be coupled to the commonvoltage. A control terminal of the fourth transistor TR4 may beconnected to the control terminal of the third transistor TR3, a secondterminal of the fourth transistor TR4 and a control terminal of thefifth transistor TR5. A second terminal of the fifth transistor TR5 isconnected to the first terminal of the second transistor T2.

In addition, in the embodiment, the sensor may further include a firstswitch component SW1 and a second switch component SW2 as shown in FIG.6 .

A first terminal of the first switch component SW1 may be connected tothe control terminal of the third transistor TR3. A second terminal ofthe first switch component SW1 may be connected to the second terminalof the first transistor T1 and the control terminal of the fourthtransistor TR4. A first terminal of the second switch component SW2 maybe connected to the second terminal of the first transistor T1 and thesecond terminal of the first switch component SW1. A second terminal ofthe second switch component SW2 may be connected to the second terminalof the fourth transistor TR4.

As shown in FIG. 7 , before the transmitter emits the light signaltoward the object and the light signal is reflected to the photodiodePE, the first switch component SW1 is turned on and the second switchcomponent SW2 is turned off, and the first current source CS1 supplies acurrent Ih2 to the pre-charge capacitor Cr to charge a voltage of thepre-charge capacitor Cr.

After the transmitter emits the light signal toward the object for aperiod of time, the light signal is reflected to the photodiode PE andpasses through the photodiode PE. At this time, as shown in FIG. 8 , thefirst switch component SW1 is turned off and the second switch componentSW2 is turned on. The pre-charge capacitor Cr stores current informationof the current Ih2 on a previous stage in the control terminal of thethird transistor TR3. The transistor TR3 is discharged to output acurrent Ih1 flowing through the first current source CS1 to a ground.The current Ih1 is equal to the current Ih2. At the same time, aphotocurrent Is2 sensed by the photodiode PE flows from the fourthtransistor TR4 such that the fifth transistor TR5 of the first currentmirror circuit MR11 outputs a current that is equal to the photocurrentIs2 sensed by the photodiode PE. The current outputted by the fifthtransistor TR5 only includes the photocurrent Is2 but not the current ofthe first current source CS1.

If the ratio of the input current of the first current mirror circuitMR11 to the output current of the first current mirror circuit MR11 is1:N, the current outputted by the sensor shown in FIG. 8 is N times thephotocurrent Is2 of the photodiode PE. In the embodiment, N=1.Therefore, as shown in FIG. 8 , the current outputted by the sensor isequal to the photocurrent Is2 of the photodiode PE, but the presentdisclosure is not limited thereto.

Reference is made to FIGS. 9 to 12 , in which FIG. 9 is a waveformdiagram of the sensor according to the second embodiment of the presentdisclosure.

The transmitter starts to emit the light signal toward the object at atime point of a rising edge of a light emission time signal TES2 shownin FIGS. 8 to 12 . The transmitter emits the light signal toward theobject for a period of time during which the light emission time signalTES2 is at a high level. The photodiode PE shown in FIG. 8 converts thelight signal into the photocurrent and finally the output terminal ofthe sensor outputs the current that is equal to the photocurrent Is2shown in FIGS. 9 to 12 .

The processor circuit (such as the analog-digital converter) connectedto the output terminal of the sensor starts to process the current thatis equal to the photocurrent Is2 and outputted by the sensor at a timepoint at which an analog-digital processing signal ADS2 shown in FIGS. 9to 12 transits from a low level to a high level. For example, the signalof the current that is equal to the photocurrent Is2 is converted froman analog form into a digital form.

For example, the output terminal of the sensor shown in FIG. 8 (that isthe second terminal of the second transistor T2) may be connected to acharge capacitor (not shown in figures). The charge capacitor is chargedby the current that is equal to the photocurrent Is2 and outputted bythe senor such that a signal of a voltage of the charge capacitorgradually rises, which is represented by a capacitor voltage signal CVS1shown in FIGS. 10 and 12 . When the voltage of the charge capacitorreaches a voltage of a reference voltage signal VRS2 shown in FIGS. 10and 12 , the voltage of the charge capacitor is pulled down to a valleyvalue by the processor circuit. After a period of time has elapsed, thecharge capacitor is charged to reach the voltage of the referencevoltage signal VRS1 from the valley value again.

A counter of the processor circuit may count the number of times thatthe charge capacitor is charged and discharged. That is, the countercounts the number of waveforms of the capacitor voltage signal CVS2. Adistance between the object and the electronic device (such as the cellphone) to which the sensor shown in FIG. 8 is applied is determinedaccording to the counted number.

Reference is made to FIG. 13 , which is a curve diagram of the sensoraccording to the first and second embodiments of the present disclosureand a conventional sensor.

As shown in FIG. 13 , a horizontal axis of the curve diagram representsa distance between the object and the sensor, and a vertical axis of thecurve diagram represents a count value detected by the sensor. The countvalue is the number of times that the charge capacitor is charged anddischarged and counted by the sensor. For example, the count value isthe number of the waveforms of the capacitor voltage signal CVS2 shownin FIG. 12 . The distance between the object and the electronic device(such as the cell phone) may be determined according to the count valuedetected by the sensor.

It should be understood that the farther the distance that is detectableby the sensor, the better. As shown in FIG. 13 , the conventional sensorcan only detect up to a short distance of 5 cm. When the distancebetween the object and the electronic device is larger than 5 cm, avalue counted by the conventional sensor is not correct and thus thedistance cannot be correctly calculated according to the value countedby the conventional sensor. In contrast, the sensor of the presentdisclosure can detect for a distance of up to 11 cm. It is thereforeapparent that the sensor of the present disclosure has better efficacythan that of the conventional sensor.

In summary, the present disclosure provides the sensor in which thecurrent source is disposed and connected to the cathode of thephotodiode such that a discharging path of the parasitic capacitor ofthe photodiode is formed. As a result, after the light stops passingthrough the photodiode, the parasitic capacitor does not have an extracharge and the voltage of the cathode of the photodiode is not affectedby the voltage of the parasitic capacitor. Therefore, the photodiode canoperate normally. It is worth noting that, the sensor of the presentdisclosure includes the bias circuit of the photodiode such that thecurrent sensed by the sensor only includes the photocurrent that isconverted from the light signal by the photodiode, but not the currentprovided by the current source.

The foregoing description of the exemplary embodiments of the disclosurehas been presented only for the purposes of illustration and descriptionand is not intended to be exhaustive or to limit the disclosure to theprecise forms disclosed. Many modifications and variations are possiblein light of the above teaching.

The embodiments were chosen and described in order to explain theprinciples of the disclosure and their practical application so as toenable others skilled in the art to utilize the disclosure and variousembodiments and with various modifications as are suited to theparticular use contemplated. Alternative embodiments will becomeapparent to those skilled in the art to which the present disclosurepertains without departing from its spirit and scope.

What is claimed is:
 1. A sensor, comprising: a photodiode, wherein ananode of the photodiode is grounded, and the photodiode is configured toconvert energy of light passing through the photodiode into aphotocurrent; a first operational amplifier, wherein a first inputterminal of the first operational amplifier is coupled to a referencevoltage, and a second input terminal of the first operational amplifieris connected to a cathode of the photodiode; a first current source,wherein a first terminal of the first current source is connected to thecathode of the photodiode and a second terminal of the first currentsource is grounded; a first transistor, wherein a control terminal ofthe first transistor is connected to an output terminal of the firstoperational amplifier, and a first terminal of the first transistor isconnected to the cathode of the photodiode; a second transistor, whereina control terminal of the second transistor is connected to the outputterminal of the first operational amplifier; a current mirror circuitincluding a third transistor, a fourth transistor and a fifthtransistor, wherein a first terminal of the third transistor, a firstterminal of the fourth transistor and a first terminal of the fifthtransistor are coupled to the common voltage, a second terminal of thethird transistor is connected to a second terminal of the firsttransistor and a control terminal of the third transistor, a controlterminal of the fourth transistor is connected to the control terminalof the third transistor, a second terminal of the fourth transistor anda control terminal of the fifth transistor, and a second terminal of thefifth transistor is connected to a first terminal of the secondtransistor; and a pre-charge capacitor, wherein a first terminal of thepre-charge capacitor is coupled to a common voltage, and a secondterminal of the pre-charge capacitor is connected to the controlterminal of the third transistor; wherein the first current sourcesupplies a current to the pre-charge capacitor to charge the pre-chargecapacitor such that a voltage of the pre-charge capacitor increases to atarget voltage value, the current is stored in the control terminal ofthe third transistor, then the light passes through the photodiode, thecurrent is discharged from the third transistor through the firstcurrent source to a ground, and a current flowing through a secondterminal of the second transistor is a current sensed by the sensor. 2.The sensor according to claim 1, further comprising: a second currentsource, wherein a first terminal of the second current source isconnected to the second terminal of the second transistor, and a secondterminal of the second current source is grounded.
 3. The sensoraccording to claim 2, further comprising: a second switch component,wherein a first terminal of the second switch component is connected tothe second terminal of the first transistor and the second terminal ofthe first switch component, and a second terminal of the second switchcomponent is connected to the second terminal of the fourth transistor.4. The sensor according to claim 1, further comprising: a first switchcomponent, wherein a first terminal of the first switch component isconnected to the control terminal of the third transistor, and a secondterminal of the first switch component is connected to the secondterminal of the first transistor and the control terminal of the fourthtransistor.
 5. The sensor according to claim 1, further comprising: afirst capacitor, wherein a first terminal of the first capacitor isconnected to the output terminal of the first operational amplifier, anda second terminal of the first capacitor is connected to the cathode ofthe photodiode.